Skip to content

chore: remove :error_handlers from required fields#120

Merged
Annopaolo merged 1 commit intoastarte-platform:release-1.2from
noaccOS:chore/remove-warning
Apr 23, 2025
Merged

chore: remove :error_handlers from required fields#120
Annopaolo merged 1 commit intoastarte-platform:release-1.2from
noaccOS:chore/remove-warning

Conversation

@noaccOS
Copy link
Copy Markdown
Collaborator

@noaccOS noaccOS commented Apr 8, 2025

this fixes the following warning:
attempting to determine the presence of embed_many field :error_handlers with validate_required/3 or field_missing?/2 which has no effect. You can pass the :required option to Ecto.Changeset.cast_embed/3 to achieve this.

as we already have required: true in the cast_embed, this should be a non-issue

this is important as it fixes a runtime warning, which pollutes eg tests from astarte-platform/astarte_generators#21

@noaccOS noaccOS changed the title chore: remove :error_handlers from allowed fields chore: remove :error_handlers from required fields Apr 8, 2025
this fixes the following warning:
attempting to determine the presence of embed_many field :error_handlers with validate_required/3 or field_missing?/2 which has no effect. You can pass the :required option to Ecto.Changeset.cast_embed/3 to achieve this.

as we already have `required: true` in the `cast_embed`, this should
be a non-issue

Signed-off-by: Francesco Noacco <francesco.noacco@secomind.com>
@noaccOS noaccOS force-pushed the chore/remove-warning branch from 5113351 to 081827e Compare April 8, 2025 09:50
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.53%. Comparing base (7ba3d8f) to head (081827e).
Report is 4 commits behind head on release-1.2.

Additional details and impacted files
@@             Coverage Diff              @@
##           release-1.2     #120   +/-   ##
============================================
  Coverage        76.53%   76.53%           
============================================
  Files               50       50           
  Lines              861      861           
============================================
  Hits               659      659           
  Misses             202      202           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Collaborator

@lusergit lusergit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@Annopaolo Annopaolo merged commit 710afe5 into astarte-platform:release-1.2 Apr 23, 2025
3 checks passed
@noaccOS noaccOS deleted the chore/remove-warning branch April 23, 2025 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants